package com.platform.web.controller.module;

import com.platform.common.core.controller.BaseController;
import com.platform.module.service.IBaseCalorimeterDataService;
import com.platform.module.service.IBaseConcentratorDataService;
import com.platform.module.service.IBaseValveDataService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 集中器展示
 *
 * @author wangqi
 * @date 2020-07-24
 */
@Controller
@RequestMapping("/module/concentrator/recorddata")
public class ConcentratorRecordDataController extends BaseController {

    private String prefix = "module/concentrator/recorddata";

    @Autowired
    private IBaseConcentratorDataService baseConcentratorDataService;

    @Autowired
    private IBaseValveDataService baseValveDataService;

    @Autowired
    private IBaseCalorimeterDataService baseCalorimeterDataService;

    @RequiresPermissions("module:concentrator:recorddata:view")
    @GetMapping("/{concentratorId}")
    public String recorddata(@PathVariable("concentratorId") String concentratorId, ModelMap mmap)
    {
        if(!concentratorId.equals("0")){
            mmap.put("concentratorId",concentratorId);
        }
        return prefix + "/recorddata";
    }
}
